// import { archService } from '@/modules/model/service/ArchService';
// import { Action } from "@/mdesign-lib/mdesign-app.umd.js";
// import { customSystemConfig } from '..';
// import * as path from 'path';
// import { profileLibService } from '@/modules/model/service';
// import { ActionKey } from '@/action/ActionKey';

// export class LoadCustomizationProfilesAction extends Action {
//   keyName = "loadCustomizationProfiles" as ActionKey
//   desc = "loadCustomizationProfiles"

//   async run() {
//     const customizationProfiles = customSystemConfig.customizationProfiles;
//     if (customizationProfiles?.length) {
//       const packageIds = await profileLibService.getSystemPkgIds();
//       for (let customizationProfile of customizationProfiles) {
//         const profileName = customizationProfile.profileName;
//         const profileVersion = customizationProfile.profileVersion;
//         const profileFileName = `${profileName}(#${profileVersion})`;
//         const dir = `arch/customization/${process.env.VUE_APP_CUSTOMIZATION}/public/customizationProfiles/${profileFileName}.md3p`;
//         const profilePath = path.resolve(app.global.path.archStaticResource, dir);
//         const canUploadCustomizationProfile = await archService.canUploadCustomizationProfile(profileName, profileVersion, profilePath);
//         console.log('canUploadCustomizationProfile', canUploadCustomizationProfile);
//         if (canUploadCustomizationProfile) {
//           await profileLibService.addProfile(packageIds.commonPkgId, profilePath);
//         }
//       }
//     }

//   }

// }
